package com.itheima.test;

import com.itheima.domain.GirlFriend;

import java.util.Arrays;

public class Test06 {
    public static void main(String[] args) {

        GirlFriend[] arr = new GirlFriend[3];

        GirlFriend xiaoshihsi = new GirlFriend("xiaoshihsi", 18, 1.67);
        GirlFriend xiaodandan = new GirlFriend("xiaodandan", 19, 1.70);
        GirlFriend xiaohuihui = new GirlFriend("xiaohuihui", 18, 1.78);


        arr[0] = xiaodandan;
        arr[1] = xiaohuihui;
        arr[2] = xiaoshihsi;


        String[] name = {"xiaohong", "xiaodan", "xiaomei"};


        /*String str = "xiaohong";
        System.out.println(str == name[0]);

        str = "xiaomei";

        System.out.println(str==name[2]);*/

        int i = 0;

        int[] arrint = {1, 2, 3, 4, 5};

        for (int i1 : arrint) {
            i1 = 3;
        }
        System.out.println(Arrays.toString(arrint));


        System.out.println(Arrays.toString(name));


        for (GirlFriend girlFriend : arr) {
            arr[i] = new GirlFriend("xiaotiantian", 57, 30);
        }


        System.out.println(Arrays.toString(arr));


    }
}
